package com.springboot.dubbo.base.po.oracle;

import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.code.ORDER;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName CallRingMsg
 * @Description: 呼叫振铃消息
 * @Author 杨冬冬
 * @Date 2021/6/2 0002 16:38
 **/
@Data
@Table(name = "CALLRINGMSG")
public class CallRingMsg implements Serializable {

    @Id
    @KeySql(sql = "select CALLRINGMSG_SEQ_ID.nextval from dual", order = ORDER.BEFORE)
    @ColumnType(column = "ID", jdbcType = JdbcType.VARCHAR)
    private String id;

    /*
     * 代理商id
     **/
    @ColumnType(column = "AGENTID", jdbcType = JdbcType.VARCHAR)
    private String agentId;

    /*
     * 绑定 ID：唯一标示一组绑定关系的 ID，和多号平台生成。
     **/
    @ColumnType(column = "BINDID", jdbcType = JdbcType.VARCHAR)
    private String bindId;

    /*
     * 通话 ID: 唯一标示一次通话的 ID，和多号平台根据通话生成。
     **/
    @ColumnType(column = "CALLID", jdbcType = JdbcType.VARCHAR)
    private String callId;

    /*
     * 主叫号码：用户号码格式遵循国际电信联盟定义的E.164 标准
     **/
    @ColumnType(column = "CALLNO", jdbcType = JdbcType.VARCHAR)
    private String callNo;

    /*
     * 被叫号码：用户号码格式遵循国际电信联盟定义的E.164 标准
     **/
    @ColumnType(column = "PEERNO", jdbcType = JdbcType.VARCHAR)
    private String peerNo;

    /*
     * 振铃发生时间: 14 位 YYYYMMDDHHMMSS 格 式 ， 例 如 ：20160906131516
     **/
    @ColumnType(column = "RINGTIME", jdbcType = JdbcType.TIMESTAMP)
    private Date ringTime;

    /*
     * 表附加字段，用于存储非必要字段
     **/
    @ColumnType(column = "CUSTOMDATA", jdbcType = JdbcType.VARCHAR)
    private String customData;

    /*
     * 话单插入时间
     **/
    @ColumnType(column = "INSERTDATE", jdbcType = JdbcType.TIMESTAMP)
    private Date insertDate;
}